cmake_minimum_required(VERSION 3.25)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cpp_novice_fetch_project_options)

project(cpp_novice LANGUAGES CXX)

include(cpp_novice_custom_project_options)
include(add_code)

# -----------------------------------------------------------------------------------------------------------------------
add_code_options(
  DEPENDENCIES

  LIBRARIES

  INCLUDES
  include
)

# ------------------------------------------------------------------------------------------------------------------------
add_code(test
  test/main.cpp
)

add_code(example_single
  src/example_single/main.cpp
)

add_code(example_multiple
  src/example_multiple/main.cpp
  src/example_multiple/hello.cpp
)

# ppp3
add_code(ch1
  src/ppp3/ch1/hello_world.cpp
)

# ------------------------------
# homework

# FT
add_code(FT_1
  src/homework/FT/FT_1/FT_1.cpp
)
# add_code(FT_1_imitate
#   src/homework/FT/FT_1_imitate/FT_1_imitate.cpp
# )

# triangle_area
add_code(triangle_area_oo
  src/homework/triangle_area/triangle_area_oo/triangle_area_oo.cpp
)

add_code(triangle_area_po
  src/homework/triangle_area/triangle_area_po/triangle_area_po.cpp
)

# ex2
add_code(t1
  src/homework/ex2/t1/t1.cpp
)

add_code(t2
  src/homework/ex2/t2/t2.cpp
)

add_code(t3
  src/homework/ex2/t3/t3.cpp
)

add_code(t4
  src/homework/ex2/t4/t4.cpp
)

add_code(t5
  src/homework/ex2/t5/t5.cpp
)

add_code(t6
  src/homework/ex2/t6/t6.cpp
)

add_code(t7one
  src/homework/ex2/t7one/t7one.cpp
)

add_code(t7two
  src/homework/ex2/t7two/t7two.cpp
)

# ch2--
add_code(2.9_struct_and_pointer_variables
  src/homework/ch2_classcode/2.9_struct_and_pointer_variables/2.9_struct_and_pointer_variables.cpp
)

add_code(2.10_class_and_member
  src/homework/ch2_classcode/2.10_class_and_member/2.10_class_and_member.cpp
)

add_code(2.11_constructors_and_data_members
  src/homework/ch2_classcode/2.11_constructors_and_data_members/2.11_constructors_and_data_members.cpp
)

add_code(2.12_pointer_variables_of_class_objects_and_class_functions
  src/homework/ch2_classcode/2.12_pointer_variables_of_class_objects_and_class_functions/2.12_pointer_variables_of_class_objects_and_class_functions.cpp
)

add_code(2.13.1_static_of_methods_for_sharing_data_members_and_sharing_classes
  src/homework/ch2_classcode/2.13.1_static_of_methods_for_sharing_data_members_and_sharing_classes/2.13.1_static_of_methods_for_sharing_data_members_and_sharing_classes.cpp
)

add_code(2.13.2_static_keep_latest
  src/homework/ch2_classcode/2.13.2_static_keep_latest/2.13.2_static_keep_latest.cpp
)

# -----

# ------------------------------
